<template>
	<div class="home">
		<!-- 父组件向子组件传值，通过属性绑定的方式 -->
		<!-- 属性传值不能使用驼峰形式，必须使用  -  形式 -->
		<son-com :name="name" :hello-word="hello" @getSon="handle($event, 2)"></son-com>
		<!-- <img alt="Vue logo" src="../assets/logo.png"> -->
		<!-- <HelloWorld msg="Welcome to Your Vue.js App"/> -->
	</div>
</template>

<script>
	// @ is an alias to /src
	// import HelloWorld from '@/components/HelloWorld.vue';
	import sonCom from '@/components/sonCom.vue'

	export default {
		name: 'Home',
		data() {
			return {
				name: 'doen',
				hello: 'ni,hao'
			}
		},
		methods: {
			handle(e, val) {
				console.log(e)

				console.log(val)
			}
		},
		components: {
			// HelloWorld,
			sonCom
		}
	}
</script>
